package com.seocoo.worker.order.model;


import com.seocoo.worker.order.entity.RxCancelInstallSuccess;
import com.seocoo.worker.order.req.ReqCancelInstall;
import com.sfh.lib.event.BusEventManager;
import com.sfh.lib.mvvm.BaseViewModel;

/**
 * author : Ssp
 * e-mail : 981297079@qq.com
 * date   : 2020/2/2320:32
 * desc   :
 * version: 1.0
 */
public class OrderCancelInstallModel extends BaseViewModel {

    public void cancelInstall(ReqCancelInstall req) {
        this.execute(false, req, baseRsp -> {
            hideLoading();
            if (baseRsp.success()) {
                BusEventManager.postEvent(new RxCancelInstallSuccess(true));
                setValue("onCancelSuccess");
            }
        });
    }
}
